package com.googlecode.jlogindexer;

import java.util.Calendar;

import org.apache.log4j.Logger;

public class AutoLogger {

	
	private static final Logger logger=Logger.getLogger(AutoLogger.class); 

	public static void main(String[] args) {
		
		AutoLogger autoLogger=new AutoLogger();
		
		try {
			autoLogger.beginLogging();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
	
	private void beginLogging() throws InterruptedException  {
		
		while (true){
			System.out.println("Hellooooo");
			System.err.println("DEBUG TO START");
			logger.debug("This is a sample cloud computing Debug Message Lucky");
			System.err.println("DEBUG DONE");
			logger.error("This is an Error computing Message Lucky");
			System.err.println("ERR DONE");
			logger.warn("This is a warning computing message Lucky");
			System.err.println("WARN DONE");
			
			//Wait for 5 seconds and then restart
			Thread.sleep(5000);
			
			
		}
		
	}

}

